3.1216 \(\int \frac {(a+b \tan (e+f x))^4}{(c+d \tan (e+f x))^2} \, dx\)

Optimal. Leaf size=285 \[ -\frac {2 \left (a^2 c+2 a b d-b^2 c\right ) \left (a^2 (-d)+2 a b c+b^2 d\right ) \log (\cos (e+f x))}{f \left (c^2+d^2\right )^2}+\frac {x \left (a^4 \left (c^2-d^2\right )+8 a^3 b c d-6 a^2 b^2 \left (c^2-d^2\right )-8 a b^3 c d+b^4 \left (c^2-d^2\right )\right )}{\left (c^2+d^2\right )^2}-\frac {b^2 \left (a d (2 b c-a d)-b^2 \left (2 c^2+d^2\right )\right ) \tan (e+f x)}{d^2 f \left (c^2+d^2\right )}-\frac {(b c-a d)^2 (a+b \tan (e+f x))^2}{d f \left (c^2+d^2\right ) (c+d \tan (e+f x))}-\frac {2 \left (a c d+b \left (c^2+2 d^2\right )\right ) (b c-a d)^3 \log (c+d \tan (e+f x))}{d^3 f \left (c^2+d^2\right )^2} \]

[Out]

(8*a^3*b*c*d-8*a*b^3*c*d+a^4*(c^2-d^2)-6*a^2*b^2*(c^2-d^2)+b^4*(c^2-d^2))*x/(c^2+d^2)^2-2*(a^2*c+2*a*b*d-b^2*c
)*(-a^2*d+2*a*b*c+b^2*d)*ln(cos(f*x+e))/(c^2+d^2)^2/f-2*(-a*d+b*c)^3*(a*c*d+b*(c^2+2*d^2))*ln(c+d*tan(f*x+e))/
d^3/(c^2+d^2)^2/f-b^2*(a*d*(-a*d+2*b*c)-b^2*(2*c^2+d^2))*tan(f*x+e)/d^2/(c^2+d^2)/f-(-a*d+b*c)^2*(a+b*tan(f*x+
e))^2/d/(c^2+d^2)/f/(c+d*tan(f*x+e))

________________________________________________________________________________________

Rubi [A]  time = 0.80, antiderivative size = 285, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {3565, 3637, 3626, 3617, 31, 3475} \[ -\frac {2 \left (a^2 c+2 a b d-b^2 c\right ) \left (a^2 (-d)+2 a b c+b^2 d\right ) \log (\cos (e+f x))}{f \left (c^2+d^2\right )^2}+\frac {x \left (-6 a^2 b^2 \left (c^2-d^2\right )+8 a^3 b c d+a^4 \left (c^2-d^2\right )-8 a b^3 c d+b^4 \left (c^2-d^2\right )\right )}{\left (c^2+d^2\right )^2}-\frac {b^2 \left (a d (2 b c-a d)-b^2 \left (2 c^2+d^2\right )\right ) \tan (e+f x)}{d^2 f \left (c^2+d^2\right )}-\frac {(b c-a d)^2 (a+b \tan (e+f x))^2}{d f \left (c^2+d^2\right ) (c+d \tan (e+f x))}-\frac {2 \left (a c d+b \left (c^2+2 d^2\right )\right ) (b c-a d)^3 \log (c+d \tan (e+f x))}{d^3 f \left (c^2+d^2\right )^2} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Tan[e + f*x])^4/(c + d*Tan[e + f*x])^2,x]

[Out]

((8*a^3*b*c*d - 8*a*b^3*c*d + a^4*(c^2 - d^2) - 6*a^2*b^2*(c^2 - d^2) + b^4*(c^2 - d^2))*x)/(c^2 + d^2)^2 - (2
*(a^2*c - b^2*c + 2*a*b*d)*(2*a*b*c - a^2*d + b^2*d)*Log[Cos[e + f*x]])/((c^2 + d^2)^2*f) - (2*(b*c - a*d)^3*(
a*c*d + b*(c^2 + 2*d^2))*Log[c + d*Tan[e + f*x]])/(d^3*(c^2 + d^2)^2*f) - (b^2*(a*d*(2*b*c - a*d) - b^2*(2*c^2
 + d^2))*Tan[e + f*x])/(d^2*(c^2 + d^2)*f) - ((b*c - a*d)^2*(a + b*Tan[e + f*x])^2)/(d*(c^2 + d^2)*f*(c + d*Ta
n[e + f*x]))

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3565

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Si
mp[((b*c - a*d)^2*(a + b*Tan[e + f*x])^(m - 2)*(c + d*Tan[e + f*x])^(n + 1))/(d*f*(n + 1)*(c^2 + d^2)), x] - D
ist[1/(d*(n + 1)*(c^2 + d^2)), Int[(a + b*Tan[e + f*x])^(m - 3)*(c + d*Tan[e + f*x])^(n + 1)*Simp[a^2*d*(b*d*(
m - 2) - a*c*(n + 1)) + b*(b*c - 2*a*d)*(b*c*(m - 2) + a*d*(n + 1)) - d*(n + 1)*(3*a^2*b*c - b^3*c - a^3*d + 3
*a*b^2*d)*Tan[e + f*x] - b*(a*d*(2*b*c - a*d)*(m + n - 1) - b^2*(c^2*(m - 2) - d^2*(n + 1)))*Tan[e + f*x]^2, x
], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && Gt
Q[m, 2] && LtQ[n, -1] && IntegerQ[2*m]

Rule 3617

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_) + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Dist[
A/(b*f), Subst[Int[(a + x)^m, x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, A, C, m}, x] && EqQ[A, C]

Rule 3626

Int[((A_) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2)/((a_.) + (b_.)*tan[(e_.) + (f_.)*
(x_)]), x_Symbol] :> Simp[((a*A + b*B - a*C)*x)/(a^2 + b^2), x] + (Dist[(A*b^2 - a*b*B + a^2*C)/(a^2 + b^2), I
nt[(1 + Tan[e + f*x]^2)/(a + b*Tan[e + f*x]), x], x] - Dist[(A*b - a*B - b*C)/(a^2 + b^2), Int[Tan[e + f*x], x
], x]) /; FreeQ[{a, b, e, f, A, B, C}, x] && NeQ[A*b^2 - a*b*B + a^2*C, 0] && NeQ[a^2 + b^2, 0] && NeQ[A*b - a
*B - b*C, 0]

Rule 3637

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)*tan[(e
_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(b*C*Tan[e + f*x]*(c + d*Tan[e + f*x])
^(n + 1))/(d*f*(n + 2)), x] - Dist[1/(d*(n + 2)), Int[(c + d*Tan[e + f*x])^n*Simp[b*c*C - a*A*d*(n + 2) - (A*b
 + a*B - b*C)*d*(n + 2)*Tan[e + f*x] - (a*C*d*(n + 2) - b*(c*C - B*d*(n + 2)))*Tan[e + f*x]^2, x], x], x] /; F
reeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[c^2 + d^2, 0] &&  !LtQ[n, -1]

Rubi steps

\begin {align*} \int \frac {(a+b \tan (e+f x))^4}{(c+d \tan (e+f x))^2} \, dx &=-\frac {(b c-a d)^2 (a+b \tan (e+f x))^2}{d \left (c^2+d^2\right ) f (c+d \tan (e+f x))}+\frac {\int \frac {(a+b \tan (e+f x)) \left (2 b^3 c^2+a^3 c d-5 a b^2 c d+4 a^2 b d^2+d \left (3 a^2 b c-b^3 c-a^3 d+3 a b^2 d\right ) \tan (e+f x)-b \left (a d (2 b c-a d)-b^2 \left (2 c^2+d^2\right )\right ) \tan ^2(e+f x)\right )}{c+d \tan (e+f x)} \, dx}{d \left (c^2+d^2\right )}\\ &=-\frac {b^2 \left (a d (2 b c-a d)-b^2 \left (2 c^2+d^2\right )\right ) \tan (e+f x)}{d^2 \left (c^2+d^2\right ) f}-\frac {(b c-a d)^2 (a+b \tan (e+f x))^2}{d \left (c^2+d^2\right ) f (c+d \tan (e+f x))}-\frac {\int \frac {-4 a b^3 c^2 d-a^4 c d^2+6 a^2 b^2 c d^2-4 a^3 b d^3+b^4 c \left (2 c^2+d^2\right )-d^2 \left (4 a^3 b c-4 a b^3 c-a^4 d+6 a^2 b^2 d-b^4 d\right ) \tan (e+f x)+2 b^3 (b c-2 a d) \left (c^2+d^2\right ) \tan ^2(e+f x)}{c+d \tan (e+f x)} \, dx}{d^2 \left (c^2+d^2\right )}\\ &=\frac {\left (8 a^3 b c d-8 a b^3 c d+a^4 \left (c^2-d^2\right )-6 a^2 b^2 \left (c^2-d^2\right )+b^4 \left (c^2-d^2\right )\right ) x}{\left (c^2+d^2\right )^2}-\frac {b^2 \left (a d (2 b c-a d)-b^2 \left (2 c^2+d^2\right )\right ) \tan (e+f x)}{d^2 \left (c^2+d^2\right ) f}-\frac {(b c-a d)^2 (a+b \tan (e+f x))^2}{d \left (c^2+d^2\right ) f (c+d \tan (e+f x))}+\frac {\left (2 \left (a^2 c-b^2 c+2 a b d\right ) \left (2 a b c-a^2 d+b^2 d\right )\right ) \int \tan (e+f x) \, dx}{\left (c^2+d^2\right )^2}-\frac {\left (2 (b c-a d)^3 \left (a c d+b \left (c^2+2 d^2\right )\right )\right ) \int \frac {1+\tan ^2(e+f x)}{c+d \tan (e+f x)} \, dx}{d^2 \left (c^2+d^2\right )^2}\\ &=\frac {\left (8 a^3 b c d-8 a b^3 c d+a^4 \left (c^2-d^2\right )-6 a^2 b^2 \left (c^2-d^2\right )+b^4 \left (c^2-d^2\right )\right ) x}{\left (c^2+d^2\right )^2}-\frac {2 \left (a^2 c-b^2 c+2 a b d\right ) \left (2 a b c-a^2 d+b^2 d\right ) \log (\cos (e+f x))}{\left (c^2+d^2\right )^2 f}-\frac {b^2 \left (a d (2 b c-a d)-b^2 \left (2 c^2+d^2\right )\right ) \tan (e+f x)}{d^2 \left (c^2+d^2\right ) f}-\frac {(b c-a d)^2 (a+b \tan (e+f x))^2}{d \left (c^2+d^2\right ) f (c+d \tan (e+f x))}-\frac {\left (2 (b c-a d)^3 \left (a c d+b \left (c^2+2 d^2\right )\right )\right ) \operatorname {Subst}\left (\int \frac {1}{c+x} \, dx,x,d \tan (e+f x)\right )}{d^3 \left (c^2+d^2\right )^2 f}\\ &=\frac {\left (8 a^3 b c d-8 a b^3 c d+a^4 \left (c^2-d^2\right )-6 a^2 b^2 \left (c^2-d^2\right )+b^4 \left (c^2-d^2\right )\right ) x}{\left (c^2+d^2\right )^2}-\frac {2 \left (a^2 c-b^2 c+2 a b d\right ) \left (2 a b c-a^2 d+b^2 d\right ) \log (\cos (e+f x))}{\left (c^2+d^2\right )^2 f}-\frac {2 (b c-a d)^3 \left (a c d+b \left (c^2+2 d^2\right )\right ) \log (c+d \tan (e+f x))}{d^3 \left (c^2+d^2\right )^2 f}-\frac {b^2 \left (a d (2 b c-a d)-b^2 \left (2 c^2+d^2\right )\right ) \tan (e+f x)}{d^2 \left (c^2+d^2\right ) f}-\frac {(b c-a d)^2 (a+b \tan (e+f x))^2}{d \left (c^2+d^2\right ) f (c+d \tan (e+f x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 7.07, size = 1789, normalized size = 6.28 \[ \frac {2 \left (-i b^4 d^2 c^{10}-b^4 d^3 c^9+2 i a b^3 d^3 c^9-3 i b^4 d^4 c^8+2 a b^3 d^4 c^8-3 b^4 d^5 c^7+8 i a b^3 d^5 c^7-2 i a^3 b d^5 c^7+i a^4 d^6 c^6-2 i b^4 d^6 c^6+8 a b^3 d^6 c^6-6 i a^2 b^2 d^6 c^6-2 a^3 b d^6 c^6+a^4 d^7 c^5-2 b^4 d^7 c^5+6 i a b^3 d^7 c^5-6 a^2 b^2 d^7 c^5+i a^4 d^8 c^4+6 a b^3 d^8 c^4-6 i a^2 b^2 d^8 c^4+a^4 d^9 c^3-6 a^2 b^2 d^9 c^3+2 i a^3 b d^9 c^3+2 a^3 b d^{10} c^2\right ) (e+f x) \cos ^2(e+f x) (c \cos (e+f x)+d \sin (e+f x))^2 (a+b \tan (e+f x))^4}{c^2 (c-i d)^4 (c+i d)^3 d^5 f (a \cos (e+f x)+b \sin (e+f x))^4 (c+d \tan (e+f x))^2}-\frac {2 i \left (-b^4 c^5+2 a b^3 d c^4-2 b^4 d^2 c^3+6 a b^3 d^3 c^2-2 a^3 b d^3 c^2+a^4 d^4 c-6 a^2 b^2 d^4 c+2 a^3 b d^5\right ) \tan ^{-1}(\tan (e+f x)) \cos ^2(e+f x) (c \cos (e+f x)+d \sin (e+f x))^2 (a+b \tan (e+f x))^4}{d^3 \left (c^2+d^2\right )^2 f (a \cos (e+f x)+b \sin (e+f x))^4 (c+d \tan (e+f x))^2}-\frac {2 \left (2 a b^3 d-b^4 c\right ) \cos ^2(e+f x) \log (\cos (e+f x)) (c \cos (e+f x)+d \sin (e+f x))^2 (a+b \tan (e+f x))^4}{d^3 f (a \cos (e+f x)+b \sin (e+f x))^4 (c+d \tan (e+f x))^2}+\frac {\left (-b^4 c^5+2 a b^3 d c^4-2 b^4 d^2 c^3+6 a b^3 d^3 c^2-2 a^3 b d^3 c^2+a^4 d^4 c-6 a^2 b^2 d^4 c+2 a^3 b d^5\right ) \cos ^2(e+f x) \log \left ((c \cos (e+f x)+d \sin (e+f x))^2\right ) (c \cos (e+f x)+d \sin (e+f x))^2 (a+b \tan (e+f x))^4}{d^3 \left (c^2+d^2\right )^2 f (a \cos (e+f x)+b \sin (e+f x))^4 (c+d \tan (e+f x))^2}+\frac {\cos (e+f x) (c \cos (e+f x)+d \sin (e+f x)) \left (2 b^4 \sin (2 (e+f x)) c^6+b^4 d c^5-b^4 d \cos (2 (e+f x)) c^5-4 a b^3 d \sin (2 (e+f x)) c^5+a^4 d^2 (e+f x) c^4+b^4 d^2 (e+f x) c^4-6 a^2 b^2 d^2 (e+f x) c^4+a^4 d^2 (e+f x) \cos (2 (e+f x)) c^4+b^4 d^2 (e+f x) \cos (2 (e+f x)) c^4-6 a^2 b^2 d^2 (e+f x) \cos (2 (e+f x)) c^4+3 b^4 d^2 \sin (2 (e+f x)) c^4+6 a^2 b^2 d^2 \sin (2 (e+f x)) c^4+2 b^4 d^3 c^3-8 a b^3 d^3 (e+f x) c^3+8 a^3 b d^3 (e+f x) c^3-2 b^4 d^3 \cos (2 (e+f x)) c^3-8 a b^3 d^3 (e+f x) \cos (2 (e+f x)) c^3+8 a^3 b d^3 (e+f x) \cos (2 (e+f x)) c^3-4 a b^3 d^3 \sin (2 (e+f x)) c^3-4 a^3 b d^3 \sin (2 (e+f x)) c^3+a^4 d^3 (e+f x) \sin (2 (e+f x)) c^3+b^4 d^3 (e+f x) \sin (2 (e+f x)) c^3-6 a^2 b^2 d^3 (e+f x) \sin (2 (e+f x)) c^3-a^4 d^4 (e+f x) c^2-b^4 d^4 (e+f x) c^2+6 a^2 b^2 d^4 (e+f x) c^2-a^4 d^4 (e+f x) \cos (2 (e+f x)) c^2-b^4 d^4 (e+f x) \cos (2 (e+f x)) c^2+6 a^2 b^2 d^4 (e+f x) \cos (2 (e+f x)) c^2+a^4 d^4 \sin (2 (e+f x)) c^2+b^4 d^4 \sin (2 (e+f x)) c^2+6 a^2 b^2 d^4 \sin (2 (e+f x)) c^2-8 a b^3 d^4 (e+f x) \sin (2 (e+f x)) c^2+8 a^3 b d^4 (e+f x) \sin (2 (e+f x)) c^2+b^4 d^5 c-b^4 d^5 \cos (2 (e+f x)) c-4 a^3 b d^5 \sin (2 (e+f x)) c-a^4 d^5 (e+f x) \sin (2 (e+f x)) c-b^4 d^5 (e+f x) \sin (2 (e+f x)) c+6 a^2 b^2 d^5 (e+f x) \sin (2 (e+f x)) c+a^4 d^6 \sin (2 (e+f x))\right ) (a+b \tan (e+f x))^4}{2 c (c-i d)^2 (c+i d)^2 d^2 f (a \cos (e+f x)+b \sin (e+f x))^4 (c+d \tan (e+f x))^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Tan[e + f*x])^4/(c + d*Tan[e + f*x])^2,x]

[Out]

(2*((-I)*b^4*c^10*d^2 + (2*I)*a*b^3*c^9*d^3 - b^4*c^9*d^3 + 2*a*b^3*c^8*d^4 - (3*I)*b^4*c^8*d^4 - (2*I)*a^3*b*
c^7*d^5 + (8*I)*a*b^3*c^7*d^5 - 3*b^4*c^7*d^5 + I*a^4*c^6*d^6 - 2*a^3*b*c^6*d^6 - (6*I)*a^2*b^2*c^6*d^6 + 8*a*
b^3*c^6*d^6 - (2*I)*b^4*c^6*d^6 + a^4*c^5*d^7 - 6*a^2*b^2*c^5*d^7 + (6*I)*a*b^3*c^5*d^7 - 2*b^4*c^5*d^7 + I*a^
4*c^4*d^8 - (6*I)*a^2*b^2*c^4*d^8 + 6*a*b^3*c^4*d^8 + a^4*c^3*d^9 + (2*I)*a^3*b*c^3*d^9 - 6*a^2*b^2*c^3*d^9 +
2*a^3*b*c^2*d^10)*(e + f*x)*Cos[e + f*x]^2*(c*Cos[e + f*x] + d*Sin[e + f*x])^2*(a + b*Tan[e + f*x])^4)/(c^2*(c
 - I*d)^4*(c + I*d)^3*d^5*f*(a*Cos[e + f*x] + b*Sin[e + f*x])^4*(c + d*Tan[e + f*x])^2) - ((2*I)*(-(b^4*c^5) +
 2*a*b^3*c^4*d - 2*b^4*c^3*d^2 - 2*a^3*b*c^2*d^3 + 6*a*b^3*c^2*d^3 + a^4*c*d^4 - 6*a^2*b^2*c*d^4 + 2*a^3*b*d^5
)*ArcTan[Tan[e + f*x]]*Cos[e + f*x]^2*(c*Cos[e + f*x] + d*Sin[e + f*x])^2*(a + b*Tan[e + f*x])^4)/(d^3*(c^2 +
d^2)^2*f*(a*Cos[e + f*x] + b*Sin[e + f*x])^4*(c + d*Tan[e + f*x])^2) - (2*(-(b^4*c) + 2*a*b^3*d)*Cos[e + f*x]^
2*Log[Cos[e + f*x]]*(c*Cos[e + f*x] + d*Sin[e + f*x])^2*(a + b*Tan[e + f*x])^4)/(d^3*f*(a*Cos[e + f*x] + b*Sin
[e + f*x])^4*(c + d*Tan[e + f*x])^2) + ((-(b^4*c^5) + 2*a*b^3*c^4*d - 2*b^4*c^3*d^2 - 2*a^3*b*c^2*d^3 + 6*a*b^
3*c^2*d^3 + a^4*c*d^4 - 6*a^2*b^2*c*d^4 + 2*a^3*b*d^5)*Cos[e + f*x]^2*Log[(c*Cos[e + f*x] + d*Sin[e + f*x])^2]
*(c*Cos[e + f*x] + d*Sin[e + f*x])^2*(a + b*Tan[e + f*x])^4)/(d^3*(c^2 + d^2)^2*f*(a*Cos[e + f*x] + b*Sin[e +
f*x])^4*(c + d*Tan[e + f*x])^2) + (Cos[e + f*x]*(c*Cos[e + f*x] + d*Sin[e + f*x])*(b^4*c^5*d + 2*b^4*c^3*d^3 +
 b^4*c*d^5 + a^4*c^4*d^2*(e + f*x) - 6*a^2*b^2*c^4*d^2*(e + f*x) + b^4*c^4*d^2*(e + f*x) + 8*a^3*b*c^3*d^3*(e
+ f*x) - 8*a*b^3*c^3*d^3*(e + f*x) - a^4*c^2*d^4*(e + f*x) + 6*a^2*b^2*c^2*d^4*(e + f*x) - b^4*c^2*d^4*(e + f*
x) - b^4*c^5*d*Cos[2*(e + f*x)] - 2*b^4*c^3*d^3*Cos[2*(e + f*x)] - b^4*c*d^5*Cos[2*(e + f*x)] + a^4*c^4*d^2*(e
 + f*x)*Cos[2*(e + f*x)] - 6*a^2*b^2*c^4*d^2*(e + f*x)*Cos[2*(e + f*x)] + b^4*c^4*d^2*(e + f*x)*Cos[2*(e + f*x
)] + 8*a^3*b*c^3*d^3*(e + f*x)*Cos[2*(e + f*x)] - 8*a*b^3*c^3*d^3*(e + f*x)*Cos[2*(e + f*x)] - a^4*c^2*d^4*(e
+ f*x)*Cos[2*(e + f*x)] + 6*a^2*b^2*c^2*d^4*(e + f*x)*Cos[2*(e + f*x)] - b^4*c^2*d^4*(e + f*x)*Cos[2*(e + f*x)
] + 2*b^4*c^6*Sin[2*(e + f*x)] - 4*a*b^3*c^5*d*Sin[2*(e + f*x)] + 6*a^2*b^2*c^4*d^2*Sin[2*(e + f*x)] + 3*b^4*c
^4*d^2*Sin[2*(e + f*x)] - 4*a^3*b*c^3*d^3*Sin[2*(e + f*x)] - 4*a*b^3*c^3*d^3*Sin[2*(e + f*x)] + a^4*c^2*d^4*Si
n[2*(e + f*x)] + 6*a^2*b^2*c^2*d^4*Sin[2*(e + f*x)] + b^4*c^2*d^4*Sin[2*(e + f*x)] - 4*a^3*b*c*d^5*Sin[2*(e +
f*x)] + a^4*d^6*Sin[2*(e + f*x)] + a^4*c^3*d^3*(e + f*x)*Sin[2*(e + f*x)] - 6*a^2*b^2*c^3*d^3*(e + f*x)*Sin[2*
(e + f*x)] + b^4*c^3*d^3*(e + f*x)*Sin[2*(e + f*x)] + 8*a^3*b*c^2*d^4*(e + f*x)*Sin[2*(e + f*x)] - 8*a*b^3*c^2
*d^4*(e + f*x)*Sin[2*(e + f*x)] - a^4*c*d^5*(e + f*x)*Sin[2*(e + f*x)] + 6*a^2*b^2*c*d^5*(e + f*x)*Sin[2*(e +
f*x)] - b^4*c*d^5*(e + f*x)*Sin[2*(e + f*x)])*(a + b*Tan[e + f*x])^4)/(2*c*(c - I*d)^2*(c + I*d)^2*d^2*f*(a*Co
s[e + f*x] + b*Sin[e + f*x])^4*(c + d*Tan[e + f*x])^2)

________________________________________________________________________________________

fricas [B]  time = 1.06, size = 704, normalized size = 2.47 \[ -\frac {b^{4} c^{4} d^{2} - 4 \, a b^{3} c^{3} d^{3} + 6 \, a^{2} b^{2} c^{2} d^{4} - 4 \, a^{3} b c d^{5} + a^{4} d^{6} - {\left ({\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} c^{3} d^{3} + 8 \, {\left (a^{3} b - a b^{3}\right )} c^{2} d^{4} - {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} c d^{5}\right )} f x - {\left (b^{4} c^{4} d^{2} + 2 \, b^{4} c^{2} d^{4} + b^{4} d^{6}\right )} \tan \left (f x + e\right )^{2} + {\left (b^{4} c^{6} - 2 \, a b^{3} c^{5} d + 2 \, b^{4} c^{4} d^{2} - 2 \, a^{3} b c d^{5} + 2 \, {\left (a^{3} b - 3 \, a b^{3}\right )} c^{3} d^{3} - {\left (a^{4} - 6 \, a^{2} b^{2}\right )} c^{2} d^{4} + {\left (b^{4} c^{5} d - 2 \, a b^{3} c^{4} d^{2} + 2 \, b^{4} c^{3} d^{3} - 2 \, a^{3} b d^{6} + 2 \, {\left (a^{3} b - 3 \, a b^{3}\right )} c^{2} d^{4} - {\left (a^{4} - 6 \, a^{2} b^{2}\right )} c d^{5}\right )} \tan \left (f x + e\right )\right )} \log \left (\frac {d^{2} \tan \left (f x + e\right )^{2} + 2 \, c d \tan \left (f x + e\right ) + c^{2}}{\tan \left (f x + e\right )^{2} + 1}\right ) - {\left (b^{4} c^{6} - 2 \, a b^{3} c^{5} d + 2 \, b^{4} c^{4} d^{2} - 4 \, a b^{3} c^{3} d^{3} + b^{4} c^{2} d^{4} - 2 \, a b^{3} c d^{5} + {\left (b^{4} c^{5} d - 2 \, a b^{3} c^{4} d^{2} + 2 \, b^{4} c^{3} d^{3} - 4 \, a b^{3} c^{2} d^{4} + b^{4} c d^{5} - 2 \, a b^{3} d^{6}\right )} \tan \left (f x + e\right )\right )} \log \left (\frac {1}{\tan \left (f x + e\right )^{2} + 1}\right ) - {\left (2 \, b^{4} c^{5} d - 4 \, a b^{3} c^{4} d^{2} - 4 \, a^{3} b c^{2} d^{4} + 2 \, {\left (3 \, a^{2} b^{2} + b^{4}\right )} c^{3} d^{3} + {\left (a^{4} + b^{4}\right )} c d^{5} + {\left ({\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} c^{2} d^{4} + 8 \, {\left (a^{3} b - a b^{3}\right )} c d^{5} - {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} d^{6}\right )} f x\right )} \tan \left (f x + e\right )}{{\left (c^{4} d^{4} + 2 \, c^{2} d^{6} + d^{8}\right )} f \tan \left (f x + e\right ) + {\left (c^{5} d^{3} + 2 \, c^{3} d^{5} + c d^{7}\right )} f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))^4/(c+d*tan(f*x+e))^2,x, algorithm="fricas")

[Out]

-(b^4*c^4*d^2 - 4*a*b^3*c^3*d^3 + 6*a^2*b^2*c^2*d^4 - 4*a^3*b*c*d^5 + a^4*d^6 - ((a^4 - 6*a^2*b^2 + b^4)*c^3*d
^3 + 8*(a^3*b - a*b^3)*c^2*d^4 - (a^4 - 6*a^2*b^2 + b^4)*c*d^5)*f*x - (b^4*c^4*d^2 + 2*b^4*c^2*d^4 + b^4*d^6)*
tan(f*x + e)^2 + (b^4*c^6 - 2*a*b^3*c^5*d + 2*b^4*c^4*d^2 - 2*a^3*b*c*d^5 + 2*(a^3*b - 3*a*b^3)*c^3*d^3 - (a^4
 - 6*a^2*b^2)*c^2*d^4 + (b^4*c^5*d - 2*a*b^3*c^4*d^2 + 2*b^4*c^3*d^3 - 2*a^3*b*d^6 + 2*(a^3*b - 3*a*b^3)*c^2*d
^4 - (a^4 - 6*a^2*b^2)*c*d^5)*tan(f*x + e))*log((d^2*tan(f*x + e)^2 + 2*c*d*tan(f*x + e) + c^2)/(tan(f*x + e)^
2 + 1)) - (b^4*c^6 - 2*a*b^3*c^5*d + 2*b^4*c^4*d^2 - 4*a*b^3*c^3*d^3 + b^4*c^2*d^4 - 2*a*b^3*c*d^5 + (b^4*c^5*
d - 2*a*b^3*c^4*d^2 + 2*b^4*c^3*d^3 - 4*a*b^3*c^2*d^4 + b^4*c*d^5 - 2*a*b^3*d^6)*tan(f*x + e))*log(1/(tan(f*x
+ e)^2 + 1)) - (2*b^4*c^5*d - 4*a*b^3*c^4*d^2 - 4*a^3*b*c^2*d^4 + 2*(3*a^2*b^2 + b^4)*c^3*d^3 + (a^4 + b^4)*c*
d^5 + ((a^4 - 6*a^2*b^2 + b^4)*c^2*d^4 + 8*(a^3*b - a*b^3)*c*d^5 - (a^4 - 6*a^2*b^2 + b^4)*d^6)*f*x)*tan(f*x +
 e))/((c^4*d^4 + 2*c^2*d^6 + d^8)*f*tan(f*x + e) + (c^5*d^3 + 2*c^3*d^5 + c*d^7)*f)

________________________________________________________________________________________

giac [B]  time = 3.66, size = 589, normalized size = 2.07 \[ \frac {\frac {b^{4} \tan \left (f x + e\right )}{d^{2}} + \frac {{\left (a^{4} c^{2} - 6 \, a^{2} b^{2} c^{2} + b^{4} c^{2} + 8 \, a^{3} b c d - 8 \, a b^{3} c d - a^{4} d^{2} + 6 \, a^{2} b^{2} d^{2} - b^{4} d^{2}\right )} {\left (f x + e\right )}}{c^{4} + 2 \, c^{2} d^{2} + d^{4}} + \frac {{\left (2 \, a^{3} b c^{2} - 2 \, a b^{3} c^{2} - a^{4} c d + 6 \, a^{2} b^{2} c d - b^{4} c d - 2 \, a^{3} b d^{2} + 2 \, a b^{3} d^{2}\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{c^{4} + 2 \, c^{2} d^{2} + d^{4}} - \frac {2 \, {\left (b^{4} c^{5} - 2 \, a b^{3} c^{4} d + 2 \, b^{4} c^{3} d^{2} + 2 \, a^{3} b c^{2} d^{3} - 6 \, a b^{3} c^{2} d^{3} - a^{4} c d^{4} + 6 \, a^{2} b^{2} c d^{4} - 2 \, a^{3} b d^{5}\right )} \log \left ({\left | d \tan \left (f x + e\right ) + c \right |}\right )}{c^{4} d^{3} + 2 \, c^{2} d^{5} + d^{7}} + \frac {2 \, b^{4} c^{5} d \tan \left (f x + e\right ) - 4 \, a b^{3} c^{4} d^{2} \tan \left (f x + e\right ) + 4 \, b^{4} c^{3} d^{3} \tan \left (f x + e\right ) + 4 \, a^{3} b c^{2} d^{4} \tan \left (f x + e\right ) - 12 \, a b^{3} c^{2} d^{4} \tan \left (f x + e\right ) - 2 \, a^{4} c d^{5} \tan \left (f x + e\right ) + 12 \, a^{2} b^{2} c d^{5} \tan \left (f x + e\right ) - 4 \, a^{3} b d^{6} \tan \left (f x + e\right ) + b^{4} c^{6} - 6 \, a^{2} b^{2} c^{4} d^{2} + 3 \, b^{4} c^{4} d^{2} + 8 \, a^{3} b c^{3} d^{3} - 8 \, a b^{3} c^{3} d^{3} - 3 \, a^{4} c^{2} d^{4} + 6 \, a^{2} b^{2} c^{2} d^{4} - a^{4} d^{6}}{{\left (c^{4} d^{3} + 2 \, c^{2} d^{5} + d^{7}\right )} {\left (d \tan \left (f x + e\right ) + c\right )}}}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))^4/(c+d*tan(f*x+e))^2,x, algorithm="giac")

[Out]

(b^4*tan(f*x + e)/d^2 + (a^4*c^2 - 6*a^2*b^2*c^2 + b^4*c^2 + 8*a^3*b*c*d - 8*a*b^3*c*d - a^4*d^2 + 6*a^2*b^2*d
^2 - b^4*d^2)*(f*x + e)/(c^4 + 2*c^2*d^2 + d^4) + (2*a^3*b*c^2 - 2*a*b^3*c^2 - a^4*c*d + 6*a^2*b^2*c*d - b^4*c
*d - 2*a^3*b*d^2 + 2*a*b^3*d^2)*log(tan(f*x + e)^2 + 1)/(c^4 + 2*c^2*d^2 + d^4) - 2*(b^4*c^5 - 2*a*b^3*c^4*d +
 2*b^4*c^3*d^2 + 2*a^3*b*c^2*d^3 - 6*a*b^3*c^2*d^3 - a^4*c*d^4 + 6*a^2*b^2*c*d^4 - 2*a^3*b*d^5)*log(abs(d*tan(
f*x + e) + c))/(c^4*d^3 + 2*c^2*d^5 + d^7) + (2*b^4*c^5*d*tan(f*x + e) - 4*a*b^3*c^4*d^2*tan(f*x + e) + 4*b^4*
c^3*d^3*tan(f*x + e) + 4*a^3*b*c^2*d^4*tan(f*x + e) - 12*a*b^3*c^2*d^4*tan(f*x + e) - 2*a^4*c*d^5*tan(f*x + e)
 + 12*a^2*b^2*c*d^5*tan(f*x + e) - 4*a^3*b*d^6*tan(f*x + e) + b^4*c^6 - 6*a^2*b^2*c^4*d^2 + 3*b^4*c^4*d^2 + 8*
a^3*b*c^3*d^3 - 8*a*b^3*c^3*d^3 - 3*a^4*c^2*d^4 + 6*a^2*b^2*c^2*d^4 - a^4*d^6)/((c^4*d^3 + 2*c^2*d^5 + d^7)*(d
*tan(f*x + e) + c)))/f

________________________________________________________________________________________

maple [B]  time = 0.22, size = 891, normalized size = 3.13 \[ -\frac {8 \arctan \left (\tan \left (f x +e \right )\right ) a \,b^{3} c d}{f \left (c^{2}+d^{2}\right )^{2}}-\frac {6 a^{2} b^{2} c^{2}}{f d \left (c^{2}+d^{2}\right ) \left (c +d \tan \left (f x +e \right )\right )}+\frac {4 c^{3} a \,b^{3}}{f \,d^{2} \left (c^{2}+d^{2}\right ) \left (c +d \tan \left (f x +e \right )\right )}+\frac {8 \arctan \left (\tan \left (f x +e \right )\right ) a^{3} b c d}{f \left (c^{2}+d^{2}\right )^{2}}-\frac {\arctan \left (\tan \left (f x +e \right )\right ) a^{4} d^{2}}{f \left (c^{2}+d^{2}\right )^{2}}+\frac {\arctan \left (\tan \left (f x +e \right )\right ) b^{4} c^{2}}{f \left (c^{2}+d^{2}\right )^{2}}-\frac {\arctan \left (\tan \left (f x +e \right )\right ) b^{4} d^{2}}{f \left (c^{2}+d^{2}\right )^{2}}-\frac {d \,a^{4}}{f \left (c^{2}+d^{2}\right ) \left (c +d \tan \left (f x +e \right )\right )}+\frac {b^{4} \tan \left (f x +e \right )}{f \,d^{2}}+\frac {6 \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) a^{2} b^{2} c d}{f \left (c^{2}+d^{2}\right )^{2}}+\frac {\arctan \left (\tan \left (f x +e \right )\right ) a^{4} c^{2}}{f \left (c^{2}+d^{2}\right )^{2}}-\frac {12 d \ln \left (c +d \tan \left (f x +e \right )\right ) a^{2} b^{2} c}{f \left (c^{2}+d^{2}\right )^{2}}+\frac {4 \ln \left (c +d \tan \left (f x +e \right )\right ) a \,b^{3} c^{4}}{f \,d^{2} \left (c^{2}+d^{2}\right )^{2}}-\frac {2 \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) a^{3} b \,d^{2}}{f \left (c^{2}+d^{2}\right )^{2}}-\frac {2 \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) a \,b^{3} c^{2}}{f \left (c^{2}+d^{2}\right )^{2}}-\frac {6 \arctan \left (\tan \left (f x +e \right )\right ) a^{2} b^{2} c^{2}}{f \left (c^{2}+d^{2}\right )^{2}}+\frac {4 a^{3} b c}{f \left (c^{2}+d^{2}\right ) \left (c +d \tan \left (f x +e \right )\right )}+\frac {2 d \ln \left (c +d \tan \left (f x +e \right )\right ) a^{4} c}{f \left (c^{2}+d^{2}\right )^{2}}+\frac {4 d^{2} \ln \left (c +d \tan \left (f x +e \right )\right ) a^{3} b}{f \left (c^{2}+d^{2}\right )^{2}}-\frac {4 \ln \left (c +d \tan \left (f x +e \right )\right ) b^{4} c^{3}}{f d \left (c^{2}+d^{2}\right )^{2}}-\frac {4 \ln \left (c +d \tan \left (f x +e \right )\right ) a^{3} b \,c^{2}}{f \left (c^{2}+d^{2}\right )^{2}}+\frac {12 \ln \left (c +d \tan \left (f x +e \right )\right ) a \,b^{3} c^{2}}{f \left (c^{2}+d^{2}\right )^{2}}-\frac {c^{4} b^{4}}{f \,d^{3} \left (c^{2}+d^{2}\right ) \left (c +d \tan \left (f x +e \right )\right )}-\frac {2 \ln \left (c +d \tan \left (f x +e \right )\right ) b^{4} c^{5}}{f \,d^{3} \left (c^{2}+d^{2}\right )^{2}}+\frac {6 \arctan \left (\tan \left (f x +e \right )\right ) a^{2} b^{2} d^{2}}{f \left (c^{2}+d^{2}\right )^{2}}+\frac {2 \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) a \,b^{3} d^{2}}{f \left (c^{2}+d^{2}\right )^{2}}-\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) b^{4} c d}{f \left (c^{2}+d^{2}\right )^{2}}-\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) a^{4} c d}{f \left (c^{2}+d^{2}\right )^{2}}+\frac {2 \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) a^{3} b \,c^{2}}{f \left (c^{2}+d^{2}\right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*tan(f*x+e))^4/(c+d*tan(f*x+e))^2,x)

[Out]

-8/f/(c^2+d^2)^2*arctan(tan(f*x+e))*a*b^3*c*d-6/f/d/(c^2+d^2)/(c+d*tan(f*x+e))*a^2*b^2*c^2+4/f/d^2/(c^2+d^2)/(
c+d*tan(f*x+e))*c^3*a*b^3+6/f/(c^2+d^2)^2*ln(1+tan(f*x+e)^2)*a^2*b^2*c*d+8/f/(c^2+d^2)^2*arctan(tan(f*x+e))*a^
3*b*c*d-1/f/(c^2+d^2)^2*arctan(tan(f*x+e))*a^4*d^2+1/f/(c^2+d^2)^2*arctan(tan(f*x+e))*b^4*c^2-1/f/(c^2+d^2)^2*
arctan(tan(f*x+e))*b^4*d^2-1/f*d/(c^2+d^2)/(c+d*tan(f*x+e))*a^4+1/f*b^4/d^2*tan(f*x+e)+1/f/(c^2+d^2)^2*arctan(
tan(f*x+e))*a^4*c^2-12/f*d/(c^2+d^2)^2*ln(c+d*tan(f*x+e))*a^2*b^2*c+4/f/d^2/(c^2+d^2)^2*ln(c+d*tan(f*x+e))*a*b
^3*c^4+2/f/(c^2+d^2)^2*ln(1+tan(f*x+e)^2)*a*b^3*d^2-1/f/(c^2+d^2)^2*ln(1+tan(f*x+e)^2)*b^4*c*d-6/f/(c^2+d^2)^2
*arctan(tan(f*x+e))*a^2*b^2*c^2+4/f/(c^2+d^2)/(c+d*tan(f*x+e))*a^3*b*c-1/f/(c^2+d^2)^2*ln(1+tan(f*x+e)^2)*a^4*
c*d+2/f/(c^2+d^2)^2*ln(1+tan(f*x+e)^2)*a^3*b*c^2+2/f*d/(c^2+d^2)^2*ln(c+d*tan(f*x+e))*a^4*c+4/f*d^2/(c^2+d^2)^
2*ln(c+d*tan(f*x+e))*a^3*b-2/f/(c^2+d^2)^2*ln(1+tan(f*x+e)^2)*a^3*b*d^2-2/f/(c^2+d^2)^2*ln(1+tan(f*x+e)^2)*a*b
^3*c^2-4/f/d/(c^2+d^2)^2*ln(c+d*tan(f*x+e))*b^4*c^3-4/f/(c^2+d^2)^2*ln(c+d*tan(f*x+e))*a^3*b*c^2+12/f/(c^2+d^2
)^2*ln(c+d*tan(f*x+e))*a*b^3*c^2-1/f/d^3/(c^2+d^2)/(c+d*tan(f*x+e))*c^4*b^4-2/f/d^3/(c^2+d^2)^2*ln(c+d*tan(f*x
+e))*b^4*c^5+6/f/(c^2+d^2)^2*arctan(tan(f*x+e))*a^2*b^2*d^2

________________________________________________________________________________________

maxima [A]  time = 0.89, size = 374, normalized size = 1.31 \[ \frac {\frac {b^{4} \tan \left (f x + e\right )}{d^{2}} + \frac {{\left ({\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} c^{2} + 8 \, {\left (a^{3} b - a b^{3}\right )} c d - {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} d^{2}\right )} {\left (f x + e\right )}}{c^{4} + 2 \, c^{2} d^{2} + d^{4}} - \frac {2 \, {\left (b^{4} c^{5} - 2 \, a b^{3} c^{4} d + 2 \, b^{4} c^{3} d^{2} - 2 \, a^{3} b d^{5} + 2 \, {\left (a^{3} b - 3 \, a b^{3}\right )} c^{2} d^{3} - {\left (a^{4} - 6 \, a^{2} b^{2}\right )} c d^{4}\right )} \log \left (d \tan \left (f x + e\right ) + c\right )}{c^{4} d^{3} + 2 \, c^{2} d^{5} + d^{7}} + \frac {{\left (2 \, {\left (a^{3} b - a b^{3}\right )} c^{2} - {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} c d - 2 \, {\left (a^{3} b - a b^{3}\right )} d^{2}\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{c^{4} + 2 \, c^{2} d^{2} + d^{4}} - \frac {b^{4} c^{4} - 4 \, a b^{3} c^{3} d + 6 \, a^{2} b^{2} c^{2} d^{2} - 4 \, a^{3} b c d^{3} + a^{4} d^{4}}{c^{3} d^{3} + c d^{5} + {\left (c^{2} d^{4} + d^{6}\right )} \tan \left (f x + e\right )}}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))^4/(c+d*tan(f*x+e))^2,x, algorithm="maxima")

[Out]

(b^4*tan(f*x + e)/d^2 + ((a^4 - 6*a^2*b^2 + b^4)*c^2 + 8*(a^3*b - a*b^3)*c*d - (a^4 - 6*a^2*b^2 + b^4)*d^2)*(f
*x + e)/(c^4 + 2*c^2*d^2 + d^4) - 2*(b^4*c^5 - 2*a*b^3*c^4*d + 2*b^4*c^3*d^2 - 2*a^3*b*d^5 + 2*(a^3*b - 3*a*b^
3)*c^2*d^3 - (a^4 - 6*a^2*b^2)*c*d^4)*log(d*tan(f*x + e) + c)/(c^4*d^3 + 2*c^2*d^5 + d^7) + (2*(a^3*b - a*b^3)
*c^2 - (a^4 - 6*a^2*b^2 + b^4)*c*d - 2*(a^3*b - a*b^3)*d^2)*log(tan(f*x + e)^2 + 1)/(c^4 + 2*c^2*d^2 + d^4) -
(b^4*c^4 - 4*a*b^3*c^3*d + 6*a^2*b^2*c^2*d^2 - 4*a^3*b*c*d^3 + a^4*d^4)/(c^3*d^3 + c*d^5 + (c^2*d^4 + d^6)*tan
(f*x + e)))/f

________________________________________________________________________________________

mupad [B]  time = 9.38, size = 347, normalized size = 1.22 \[ \frac {\ln \left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )\,\left (d^3\,\left (12\,a\,b^3\,c^2-4\,a^3\,b\,c^2\right )+d^4\,\left (2\,a^4\,c-12\,a^2\,b^2\,c\right )-2\,b^4\,c^5+4\,a^3\,b\,d^5-4\,b^4\,c^3\,d^2+4\,a\,b^3\,c^4\,d\right )}{f\,\left (c^4\,d^3+2\,c^2\,d^5+d^7\right )}+\frac {b^4\,\mathrm {tan}\left (e+f\,x\right )}{d^2\,f}-\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )\,\left (a^4+a^3\,b\,4{}\mathrm {i}-6\,a^2\,b^2-a\,b^3\,4{}\mathrm {i}+b^4\right )}{2\,f\,\left (-c^2\,1{}\mathrm {i}+2\,c\,d+d^2\,1{}\mathrm {i}\right )}-\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,\left (a^4\,1{}\mathrm {i}+4\,a^3\,b-a^2\,b^2\,6{}\mathrm {i}-4\,a\,b^3+b^4\,1{}\mathrm {i}\right )}{2\,f\,\left (-c^2+c\,d\,2{}\mathrm {i}+d^2\right )}-\frac {a^4\,d^4-4\,a^3\,b\,c\,d^3+6\,a^2\,b^2\,c^2\,d^2-4\,a\,b^3\,c^3\,d+b^4\,c^4}{d\,f\,\left (\mathrm {tan}\left (e+f\,x\right )\,d^3+c\,d^2\right )\,\left (c^2+d^2\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*tan(e + f*x))^4/(c + d*tan(e + f*x))^2,x)

[Out]

(log(c + d*tan(e + f*x))*(d^3*(12*a*b^3*c^2 - 4*a^3*b*c^2) + d^4*(2*a^4*c - 12*a^2*b^2*c) - 2*b^4*c^5 + 4*a^3*
b*d^5 - 4*b^4*c^3*d^2 + 4*a*b^3*c^4*d))/(f*(d^7 + 2*c^2*d^5 + c^4*d^3)) + (b^4*tan(e + f*x))/(d^2*f) - (log(ta
n(e + f*x) - 1i)*(a^3*b*4i - a*b^3*4i + a^4 + b^4 - 6*a^2*b^2))/(2*f*(2*c*d - c^2*1i + d^2*1i)) - (log(tan(e +
 f*x) + 1i)*(4*a^3*b - 4*a*b^3 + a^4*1i + b^4*1i - a^2*b^2*6i))/(2*f*(c*d*2i - c^2 + d^2)) - (a^4*d^4 + b^4*c^
4 + 6*a^2*b^2*c^2*d^2 - 4*a*b^3*c^3*d - 4*a^3*b*c*d^3)/(d*f*(c*d^2 + d^3*tan(e + f*x))*(c^2 + d^2))

________________________________________________________________________________________

sympy [A]  time = 5.56, size = 8928, normalized size = 31.33 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))**4/(c+d*tan(f*x+e))**2,x)

[Out]

Piecewise((zoo*x*(a + b*tan(e))**4/tan(e)**2, Eq(c, 0) & Eq(d, 0) & Eq(f, 0)), ((a**4*x + 2*a**3*b*log(tan(e +
 f*x)**2 + 1)/f - 6*a**2*b**2*x + 6*a**2*b**2*tan(e + f*x)/f - 2*a*b**3*log(tan(e + f*x)**2 + 1)/f + 2*a*b**3*
tan(e + f*x)**2/f + b**4*x + b**4*tan(e + f*x)**3/(3*f) - b**4*tan(e + f*x)/f)/c**2, Eq(d, 0)), (a**4*f*x*tan(
e + f*x)**2/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 2*I*a**4*f*x*tan(e + f*x)/(-4*d
**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - a**4*f*x/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f
*tan(e + f*x) + 4*d**2*f) + a**4*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f)
 - 2*I*a**4/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 4*I*a**3*b*f*x*tan(e + f*x)**2/
(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 8*a**3*b*f*x*tan(e + f*x)/(-4*d**2*f*tan(e
+ f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 4*I*a**3*b*f*x/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e
 + f*x) + 4*d**2*f) - 4*I*a**3*b*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f)
 - 6*a**2*b**2*f*x*tan(e + f*x)**2/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 12*I*a**
2*b**2*f*x*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 6*a**2*b**2*f*x/(-4
*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 18*a**2*b**2*tan(e + f*x)/(-4*d**2*f*tan(e + f
*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 12*I*a**2*b**2/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e +
f*x) + 4*d**2*f) - 12*I*a*b**3*f*x*tan(e + f*x)**2/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d*
*2*f) - 24*a*b**3*f*x*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 12*I*a*b
**3*f*x/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 8*a*b**3*log(tan(e + f*x)**2 + 1)*t
an(e + f*x)**2/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 16*I*a*b**3*log(tan(e + f*x)
**2 + 1)*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 8*a*b**3*log(tan(e +
f*x)**2 + 1)/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 20*I*a*b**3*tan(e + f*x)/(-4*d
**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 16*a*b**3/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*
f*tan(e + f*x) + 4*d**2*f) + 9*b**4*f*x*tan(e + f*x)**2/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) +
 4*d**2*f) - 18*I*b**4*f*x*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 9*b
**4*f*x/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 4*I*b**4*log(tan(e + f*x)**2 + 1)*t
an(e + f*x)**2/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 8*b**4*log(tan(e + f*x)**2 +
 1)*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 4*I*b**4*log(tan(e + f*x)*
*2 + 1)/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 4*b**4*tan(e + f*x)**3/(-4*d**2*f*t
an(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 19*b**4*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d
**2*f*tan(e + f*x) + 4*d**2*f) + 14*I*b**4/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f), E
q(c, -I*d)), (a**4*f*x*tan(e + f*x)**2/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 2*I*
a**4*f*x*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - a**4*f*x/(-4*d**2*f*t
an(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + a**4*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2
*f*tan(e + f*x) + 4*d**2*f) + 2*I*a**4/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 4*I*
a**3*b*f*x*tan(e + f*x)**2/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 8*a**3*b*f*x*tan
(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 4*I*a**3*b*f*x/(-4*d**2*f*tan(e +
 f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 4*I*a**3*b*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2
*f*tan(e + f*x) + 4*d**2*f) - 6*a**2*b**2*f*x*tan(e + f*x)**2/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e +
f*x) + 4*d**2*f) - 12*I*a**2*b**2*f*x*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d*
*2*f) + 6*a**2*b**2*f*x/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 18*a**2*b**2*tan(e
+ f*x)/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 12*I*a**2*b**2/(-4*d**2*f*tan(e + f*
x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 12*I*a*b**3*f*x*tan(e + f*x)**2/(-4*d**2*f*tan(e + f*x)**2 - 8*I
*d**2*f*tan(e + f*x) + 4*d**2*f) - 24*a*b**3*f*x*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e +
f*x) + 4*d**2*f) - 12*I*a*b**3*f*x/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 8*a*b**3
*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**2/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 1
6*I*a*b**3*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2
*f) + 8*a*b**3*log(tan(e + f*x)**2 + 1)/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 20*
I*a*b**3*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 16*a*b**3/(-4*d**2*f*
tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 9*b**4*f*x*tan(e + f*x)**2/(-4*d**2*f*tan(e + f*x)**2
- 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 18*I*b**4*f*x*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan
(e + f*x) + 4*d**2*f) - 9*b**4*f*x/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 4*I*b**4
*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**2/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 8
*b**4*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) -
 4*I*b**4*log(tan(e + f*x)**2 + 1)/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 4*b**4*t
an(e + f*x)**3/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 19*b**4*tan(e + f*x)/(-4*d**
2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 14*I*b**4/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*
tan(e + f*x) + 4*d**2*f), Eq(c, I*d)), (x*(a + b*tan(e))**4/(c + d*tan(e))**2, Eq(f, 0)), (a**4*c**3*d**3*f*x/
(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e
 + f*x)) + a**4*c**2*d**4*f*x*tan(e + f*x)/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d*
*6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) + 2*a**4*c**2*d**4*log(c/d + tan(e + f*x))/(c**5*d**3*f +
c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) - a**4
*c**2*d**4*log(tan(e + f*x)**2 + 1)/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*ta
n(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) - a**4*c**2*d**4/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3
*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) - a**4*c*d**5*f*x/(c**5*d**3*f + c**4*d
**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) + 2*a**4*c*d
**5*log(c/d + tan(e + f*x))*tan(e + f*x)/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6
*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) - a**4*c*d**5*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(c**5*d*
*3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x))
 - a**4*d**6*f*x*tan(e + f*x)/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e +
f*x) + c*d**7*f + d**8*f*tan(e + f*x)) - a**4*d**6/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2
*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) - 4*a**3*b*c**3*d**3*log(c/d + tan(e + f*x))/(c**5
*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*
x)) + 2*a**3*b*c**3*d**3*log(tan(e + f*x)**2 + 1)/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*
c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) + 4*a**3*b*c**3*d**3/(c**5*d**3*f + c**4*d**4*f*tan
(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) + 8*a**3*b*c**2*d**4*
f*x/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*t
an(e + f*x)) - 4*a**3*b*c**2*d**4*log(c/d + tan(e + f*x))*tan(e + f*x)/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x)
 + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) + 2*a**3*b*c**2*d**4*log(tan(e
 + f*x)**2 + 1)*tan(e + f*x)/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f
*x) + c*d**7*f + d**8*f*tan(e + f*x)) + 8*a**3*b*c*d**5*f*x*tan(e + f*x)/(c**5*d**3*f + c**4*d**4*f*tan(e + f*
x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) + 4*a**3*b*c*d**5*log(c/d +
tan(e + f*x))/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f
+ d**8*f*tan(e + f*x)) - 2*a**3*b*c*d**5*log(tan(e + f*x)**2 + 1)/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*
c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) + 4*a**3*b*c*d**5/(c**5*d**3*f + c*
*4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) + 4*a**3
*b*d**6*log(c/d + tan(e + f*x))*tan(e + f*x)/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*
d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) - 2*a**3*b*d**6*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(c
**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e +
 f*x)) - 6*a**2*b**2*c**4*d**2/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e +
 f*x) + c*d**7*f + d**8*f*tan(e + f*x)) - 6*a**2*b**2*c**3*d**3*f*x/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) +
2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) - 6*a**2*b**2*c**2*d**4*f*x*tan(e
 + f*x)/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8
*f*tan(e + f*x)) - 12*a**2*b**2*c**2*d**4*log(c/d + tan(e + f*x))/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*
c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) + 6*a**2*b**2*c**2*d**4*log(tan(e +
 f*x)**2 + 1)/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f
+ d**8*f*tan(e + f*x)) - 6*a**2*b**2*c**2*d**4/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**
2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) + 6*a**2*b**2*c*d**5*f*x/(c**5*d**3*f + c**4*d**4*f*ta
n(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) - 12*a**2*b**2*c*d**
5*log(c/d + tan(e + f*x))*tan(e + f*x)/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f
*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) + 6*a**2*b**2*c*d**5*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(c*
*5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e +
f*x)) + 6*a**2*b**2*d**6*f*x*tan(e + f*x)/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**
6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) + 4*a*b**3*c**5*d*log(c/d + tan(e + f*x))/(c**5*d**3*f + c*
*4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) + 4*a*b*
*3*c**5*d/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d*
*8*f*tan(e + f*x)) + 4*a*b**3*c**4*d**2*log(c/d + tan(e + f*x))*tan(e + f*x)/(c**5*d**3*f + c**4*d**4*f*tan(e
+ f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) + 12*a*b**3*c**3*d**3*lo
g(c/d + tan(e + f*x))/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c
*d**7*f + d**8*f*tan(e + f*x)) - 2*a*b**3*c**3*d**3*log(tan(e + f*x)**2 + 1)/(c**5*d**3*f + c**4*d**4*f*tan(e
+ f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) + 4*a*b**3*c**3*d**3/(c*
*5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e +
f*x)) - 8*a*b**3*c**2*d**4*f*x/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e +
 f*x) + c*d**7*f + d**8*f*tan(e + f*x)) + 12*a*b**3*c**2*d**4*log(c/d + tan(e + f*x))*tan(e + f*x)/(c**5*d**3*
f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) -
2*a*b**3*c**2*d**4*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5
*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) - 8*a*b**3*c*d**5*f*x*tan(e + f*x)/(c**5*d**
3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x))
+ 2*a*b**3*c*d**5*log(tan(e + f*x)**2 + 1)/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d*
*6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) + 2*a*b**3*d**6*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(c**
5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f
*x)) - 2*b**4*c**6*log(c/d + tan(e + f*x))/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d*
*6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) - 2*b**4*c**6/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*
c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) - 2*b**4*c**5*d*log(c/d + tan(e + f
*x))*tan(e + f*x)/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**
7*f + d**8*f*tan(e + f*x)) - 4*b**4*c**4*d**2*log(c/d + tan(e + f*x))/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x)
+ 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) + b**4*c**4*d**2*tan(e + f*x)**
2/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan
(e + f*x)) - 3*b**4*c**4*d**2/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e +
f*x) + c*d**7*f + d**8*f*tan(e + f*x)) + b**4*c**3*d**3*f*x/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d
**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) - 4*b**4*c**3*d**3*log(c/d + tan(e + f*x)
)*tan(e + f*x)/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f
 + d**8*f*tan(e + f*x)) + b**4*c**2*d**4*f*x*tan(e + f*x)/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**
5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) - b**4*c**2*d**4*log(tan(e + f*x)**2 + 1)/(
c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e
+ f*x)) + 2*b**4*c**2*d**4*tan(e + f*x)**2/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d*
*6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) - b**4*c**2*d**4/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) +
 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) - b**4*c*d**5*f*x/(c**5*d**3*f +
 c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) - b**
4*c*d**5*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**
2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) - b**4*d**6*f*x*tan(e + f*x)/(c**5*d**3*f + c**4*d**4*
f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f + d**8*f*tan(e + f*x)) + b**4*d**6*tan(
e + f*x)**2/(c**5*d**3*f + c**4*d**4*f*tan(e + f*x) + 2*c**3*d**5*f + 2*c**2*d**6*f*tan(e + f*x) + c*d**7*f +
d**8*f*tan(e + f*x)), True))

________________________________________________________________________________________